package com.shawn.baseappbygroovydsl.spf

import com.choryan.quan.videowzproject.spf.SPFDelegate

/**
 * @author Secret
 * @since 2023/6/1
 */
object SPFTask : SPFDelegate() {

    override fun getSharedPreferencesName(): String {
        return "_daily_task"
    }

    var booleanTemp by boolean(defaultValue = true)
    var intTemp by int()
    var stringTemp by string(defaultValue = "0")
    var floatTemp by float(defaultValue = 0.3f)
    var longTemp by long(defaultValue = 30)
    var stringJsonTemp by string(
        defaultValue = """
            [
        {
            "imageType": 1,
            "title": "看广告赚金币"
        },
        {
            "imageType": 2,
            "title": "观看广告(%s/%s)"
        }
    ]
        """.trimIndent()
    )

    fun clear() {
        preferences.edit().clear().apply()
    }

}